#ifndef SKYBOX_H_
#define SKYBOX_H_

#include <D3D10.h>
#include <D3DX10.h>
#include <vector>

#include "geometry.h"

class Skybox {
public:
	Skybox();
	~Skybox();

	bool Initialise(ID3D10Device *device);
	void Cleanup();

	void Render(ID3D10Device *device);
	void
			SetShaderVars(D3DXMATRIX World, D3DXMATRIX View,
					D3DXMATRIX Projection);
private:

	// Shader fields
	ID3D10InputLayout *vertexLayout;
	ID3D10Buffer *pVertexBuffer;
	ID3D10Effect *effect;
	ID3D10EffectTechnique *effectTechnique;
	ID3D10EffectMatrixVariable *WorldVariable, *ProjectionVariable,
			*ViewVariable;
	std::vector<ID3D10ShaderResourceView*> textures;
	ID3D10EffectShaderResourceVariable *pTextureVariable;

private:
	bool InitialiseGeometry(ID3D10Device *device);
	bool InitialiseShader(ID3D10Device *device);
	bool CreateInputLayout(ID3D10Device *device);
	bool LoadTextures(ID3D10Device *device);
	void ObtainShaderVars();
};
#endif
